8d1125fef2eb559af525d21a9212954fff96b714,opennms-services/src/main/java/org/opennms/netmgt/eventd/processor/JdbcEventWriter.java,JdbcEventWriter,getHostName,#String#Connection#,390

Before Change


//            getHostNameStmt.close();
//        }
        try {
            return new SimpleJdbcTemplate(getDataSource()).queryForObject(EventdConstants.SQL_DB_HOSTIP_TO_HOSTNAME, String.class, new Object[] { hostip });
        } catch (EmptyResultDataAccessException e) {
            return hostip;
        }

After Change


//            getHostNameStmt.close();
//        }
        try {
            String hostname = new SimpleJdbcTemplate(getDataSource()).queryForObject(EventdConstants.SQL_DB_HOSTIP_TO_HOSTNAME, String.class, new Object[] { nodeId, hostip });
            return (hostname != null) ? hostname : hostip;
        } catch (EmptyResultDataAccessException e) {
            return hostip;
        }